package com.xh.bussiness.tiku.constant;

import io.swagger.models.auth.In;

/* 试题常量类
 * @Author daiwei
 * @Description
 * @Date 2019/1/16 15:22
 **/
public interface QuestionConstant {

    public final static String OPTION_ORDER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    /**
     * 分隔符集合
     */
    public final static String SPLIT_CHARS = ".,:;、。，：；．)）";

    /**
     * 正则匹配标记
     */
    public interface REGEX_MATCH_RULE {

        public final static String XKW_OPTION_START_TAG = "^[A-Z]．";

        /**
         * 单选题标记
         */
        public final static String SINGLE_TAG = "^(单选题)";
        /**
         * 多选题标记
         */
        public final static String MUL_TAG = "^(多选题)";
        /**
         * 填空题标记
         */
        public final static String BLANK_TAG = "^(填空题)";
        /**
         * 判断题标记
         */
        public final static String JUDGE_TAG = "^(判断题)";
        /**
         * 解答题标记
         */
        public final static String JIEDA_TAG = "^(解答题)";
        /**
         * 排序题标记
         */
        public final static String ORDER_TAG = "^(排序题)";
        /**
         * 连线题标记
         */
        public final static String LINK_TAG = "^(连线题)";
        /**
         * 匹配题标记
         */
        public final static String MATCH_TAG = "^(匹配题)";
        /**
         * 完形填空题标记
         */
        public final static String CLOZE_TAG = "^(完形填空)";

        /**
         * 选项标记
         */
        public final static String OPTION_START = "^[A-Za-z][" + SPLIT_CHARS + "]";
        /**
         * 表格类选项标记
         */
        public final static String TABLE_OPTION_START = "<table.*?>[\\s\\S]*?<\\/table>";
        /**
         * 填空筛选标记
         */
        public final static String BLANK_SELECT = "[_]{4,}";

        /**
         * 完形填空填空筛选
         */
        public final static String CLOZE_BLANK_SELECT = "[_]{2,}([\\(|（]*)(\\d*)([\\)|）]*)[_]{2,}";
        /**
         * 完形填空选项标记
         */
        public final static String CLOZE_OPTION_START = "^(\\d*)[" + SPLIT_CHARS + "]";
        /**
         * 完形填空子选项筛选
         */
        public final static String CLOZE_OPTION_CHILD_START = "[A-Za-z][" + SPLIT_CHARS + "]";

        /**
         * 判断题答案正确
         */
        public final static String JUDGE_RIGHT_ANSWER = "^(对|√)";
        /**
         * 判断题答案错误
         */
        public final static String JUDGE_WRONG_ANSWER = "^(错|×)";

        /**
         * 正确答案标记
         */
        public final static String RIGHT_ANSWER_TAG = "^(正确答案|答案)[" + SPLIT_CHARS + "]";
        /**
         * 试题解析标记
         */
        public final static String ANALYSIS_TAG = "^(试题解析|解析)[" + SPLIT_CHARS + "]";
        /**
         * 付费解析标记
         */
        public final static String ANALYSIS_PAY_TAG = "^(付费解析|付费试题解析|试题付费解析|收费解析|收费试题解析|试题收费解析)[" + SPLIT_CHARS + "]";
        /**
         * 视频解析标记
         */
        public final static String VIDEO_ANALYSIS_TAG = "^(视频解析|视频讲解)[" + SPLIT_CHARS + "]";
        /**
         * 考点标记
         */
        public final static String EXAM_POINT_TAG = "^(考点|考点分析|考点解析)[" + SPLIT_CHARS + "]";
        /**
         * 难度标记
         */
        public final static String DIFFICULT_TAG = "^(难度)[" + SPLIT_CHARS + "]";
    }

    /**
     * 试题类型
     */
    public interface TYPE {
        /**
         * 单选
         */
        public final static Integer SINGLE = 1;
        /**
         * 多选
         */
        public final static Integer MUL = 2;
        /**
         * 填空
         */
        public final static Integer BLANK = 3;
        /**
         * 判断
         */
        public final static Integer JUDGE = 4;
        /**
         * 解答
         */
        public final static Integer JIEDA = 5;
        /**
         * 排序
         */
        public final static Integer ORDER = 6;
        /**
         * 连线
         */
        public final static Integer LINK = 7;
        /**
         * 匹配
         */
        public final static Integer MATCH = 8;
        /**
         * 阅读理解
         */
        public final static Integer READING = 9;
        /**
         * 完形填空
         */
        public final static Integer CLOZE = 10;
        /**
         * 综合题
         **/
        public static final Integer COMB = 11;
    }

    /**
     * 试题栏类型
     */
    public interface CART_TYPE {
        /**
         * 通用
         */
        public final static String COMMON = "common";
    }

    /**
     * 作答结果（-1未作答，0错误，1正确，2部分正确）
     */
    public interface ANSWER_RESULT {
        /**
         * 未作答
         */
        public final static Integer UN_ANSWER = -1;
        /**
         * 错误
         */
        public final static Integer WRONG = 0;
        /**
         * 完全正确
         */
        public final static Integer RIGHT = 1;
        /**
         * 部分正确
         */
        public final static Integer PART_RIGHT = 2;

        /**
         * 无法自动判题，需要老师判题
         */
        public static final Integer TEACHER_CORRECT = 3;

    }

    /**
     * 选项排列方式最大长度
     */
    public interface OPTION_ARRANGEMENTS {
        /**
         * 一行一个选项
         */
        public final static Integer ONE = 1;
        /**
         * 一行两个个选项
         */
        public final static Integer TWO = 2;
        /**
         * 一行三个选项
         */
        public final static Integer TRHEE = 3;
        /**
         * 一行四个选项
         */
        public final static Integer FOUR = 4;

        /**
         * 一行一个选项
         */
        public final static Integer MAX_LENGTH_ONE = 100;
        /**
         * 一行两个个选项
         */
        public final static Integer MAX_LENGTH_TWO = 50;
        /**
         * 一行三个选项
         */
        public final static Integer MAX_LENGTH_TRHEE = 60;
        /**
         * 一行四个选项
         */
        public final static Integer MAX_LENGTH_FOUR = 25;


        /**
         *  下载试卷
         */
        /**
         * 一行一个选项
         */
        public final static Integer PAPER_MAX_LENGTH_ONE = 90;
        /**
         * 一行两个个选项
         */
        public final static Integer PAPER_MAX_LENGTH_TWO = 60;
        /**
         * 一行四个选项
         */
        public final static Integer PAPER_MAX_LENGTH_FOUR = 20;

    }

    public interface SOURCE_TYPE {
        //1.箐优网试题，2.区域题库试题
        Integer JYEOO = 1;
        Integer TIKU = 2;
    }


}
